import request from '@/utils/request'
const apiUrl = '/api/job-responsibility'
// 获取岗位职责书列表
export function getJobResponsibilityList(params) {
    return request({
        url: `${apiUrl}/list`,
        method: 'get',
        params
    })
}

// 获取单个岗位职责书
export function getJobResponsibility(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'get'
    })
}

// 创建岗位职责书
export function createJobResponsibility(data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

// 更新岗位职责书
export function updateJobResponsibility(id, data) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'put',
        data
    })
}

// 删除岗位职责书
export function deleteJobResponsibility(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'delete'
    })
} 